package com.lyouu.dataminer.factory;

import com.lyouu.dataminer.dao.BustourScheduleDao;
import com.lyouu.dataminer.dao.CruisetourScheduleDao;
import com.lyouu.dataminer.dao.MdAlbumDao;
import com.lyouu.dataminer.dao.MdMembersDao;
import com.lyouu.dataminer.dao.MdMysubjectDao;
import com.lyouu.dataminer.dao.MdPicturesDao;
import com.lyouu.dataminer.dao.MdSubjectBustourDao;
import com.lyouu.dataminer.dao.MdSubjectCruisetourDao;
import com.lyouu.dataminer.dao.MdSubjectDao;
import com.lyouu.dataminer.dao.MdSubjectattDao;

public class DaoFactory {
	private static BustourScheduleDao bustourScheduleDao;
	private static CruisetourScheduleDao cruisetourScheduleDao;
	private static MdAlbumDao mdAlbumDao;
	private static MdMysubjectDao mdMysubjectDao;
	private static MdPicturesDao mdPicturesDao;
	private static MdSubjectattDao mdSubjectattDao;
	private static MdSubjectBustourDao mdSubjectBustourDao;
	private static MdSubjectCruisetourDao mdSubjectCruisetourDao;
	private static MdSubjectDao mdSubjectDao;
	private static MdMembersDao mdMembersDao;

	public static BustourScheduleDao getBustourScheduleDao() {
		if (bustourScheduleDao == null) {
			synchronized (DaoFactory.class) {
				if (bustourScheduleDao == null) {
					bustourScheduleDao = new BustourScheduleDao();
				}
			}
		}
		return bustourScheduleDao;
	}
	
	public static CruisetourScheduleDao getCruisetourScheduleDao() {
		if (cruisetourScheduleDao == null) {
			synchronized (DaoFactory.class) {
				if (cruisetourScheduleDao == null) {
					cruisetourScheduleDao = new CruisetourScheduleDao();
				}
			}
		}
		return cruisetourScheduleDao;
	}

	public static MdAlbumDao getMdAlbumDao() {
		if (mdAlbumDao == null) {
			synchronized (DaoFactory.class) {
				if (mdAlbumDao == null) {
					mdAlbumDao = new MdAlbumDao();
				}
			}
		}
		return mdAlbumDao;
	}

	public static MdMysubjectDao getMdMysubjectDao() {
		if (mdMysubjectDao == null) {
			synchronized (DaoFactory.class) {
				if (mdMysubjectDao == null) {
					mdMysubjectDao = new MdMysubjectDao();
				}
			}
		}
		return mdMysubjectDao;
	}

	public static MdPicturesDao getMdPicturesDao() {
		if (mdPicturesDao == null) {
			synchronized (DaoFactory.class) {
				if (mdPicturesDao == null) {
					mdPicturesDao = new MdPicturesDao();
				}
			}
		}
		return mdPicturesDao;
	}

	public static MdSubjectattDao getMdSubjectattDao() {
		if (mdSubjectattDao == null) {
			synchronized (DaoFactory.class) {
				if (mdSubjectattDao == null) {
					mdSubjectattDao = new MdSubjectattDao();
				}
			}
		}
		return mdSubjectattDao;
	}

	public static MdSubjectBustourDao getMdSubjectBustourDao() {
		if (mdSubjectBustourDao == null) {
			synchronized (DaoFactory.class) {
				if (mdSubjectBustourDao == null) {
					mdSubjectBustourDao = new MdSubjectBustourDao();
				}
			}
		}
		return mdSubjectBustourDao;
	}
	
	public static MdSubjectCruisetourDao getMdSubjectCruisetourDao() {
		if (mdSubjectCruisetourDao == null) {
			synchronized (DaoFactory.class) {
				if (mdSubjectCruisetourDao == null) {
					mdSubjectCruisetourDao = new MdSubjectCruisetourDao();
				}
			}
		}
		return mdSubjectCruisetourDao;
	}

	public static MdSubjectDao getMdSubjectDao() {
		if (mdSubjectDao == null) {
			synchronized (DaoFactory.class) {
				if (mdSubjectDao == null) {
					mdSubjectDao = new MdSubjectDao();
				}
			}
		}
		return mdSubjectDao;
	}
	
	public static MdMembersDao getMdMembersDao() {
		if (mdMembersDao == null) {
			synchronized (DaoFactory.class) {
				if (mdMembersDao == null) {
					mdMembersDao = new MdMembersDao();
				}
			}
		}
		return mdMembersDao;
	}
}
